Skip to content

[v11] Make proxy routing logic reusable#18596

Merged
rosstimothy merged 2 commits intobranch/v11from
tross/backport-18370/v11
Nov 21, 2022
Merged

[v11] Make proxy routing logic reusable#18596
rosstimothy merged 2 commits intobranch/v11from
tross/backport-18370/v11

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

Backport #18370 to branch/v11

Routing logic existed within an unexported handler of ssh subsystem
requests, which prevented it from being reused by other components
within the proxy, like the webapi server. This causes significant
latency issues for web sessions because the web apiserver is required
to dial the proxy ssh server to determine how to route to the host.
Since the web apiserver and the proxy ssh server exist in the same
process this is an entirely unnecesarry step that could be avoided
if the routing and ability to established connections were shared
throughout the proxy.

A new `proxy.Router` object is introduced which contains all the
logic that used to exist in `regular.proxySubsys` for determining
how to connect to servers and clusters. All routing within the
`regular.proxySubsys` now leverages the `proxy.Router` to dial
the target.

This is step 1 in addressing #15167. Now that the `proxy.Router`
exists `web.APIServer` will be able to make use of it to avoid
dialing the same process to establish connections.
@rosstimothy rosstimothy force-pushed the tross/backport-18370/v11 branch from e038d70 to 13ee211 Compare November 18, 2022 14:10
@rosstimothy rosstimothy marked this pull request as ready for review November 18, 2022 14:23
@github-actions github-actions Bot requested review from fspmarshall and zmb3 November 18, 2022 14:23
@rosstimothy
Copy link
Copy Markdown
Contributor Author

friendly ping @fspmarshall

@rosstimothy rosstimothy merged commit a443ea8 into branch/v11 Nov 21, 2022
@rosstimothy rosstimothy deleted the tross/backport-18370/v11 branch November 21, 2022 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants